import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const baseUrl = Vue.prototype.$serviceUrl + "/repairInspection"

//数据字典api
export const approveApi = {
  systemDictType: function () {
    const data = {


    }
    return request({
      url: baseUrl + '/systemDictType/list',
      method: 'post',
      data: qs.stringify(data)
    })
  },
  // 保存审批人或抄送人
  batchSaveRegionUser: function (approveUserList, ifDel) {
    const data = {
      approveUserList, ifDel
    }
    return request({
      url: baseUrl + '/approveUser/saveApproveUser',
      method: 'post',
      data: qs.stringify(data)
    })

  },
  List: function (search, order) {
    const data = {
      search, order
    }
    return request({
      url: baseUrl + '/approveUser/list',
      method: 'post',
      data: qs.stringify(data)
    })
  },
  // /approveUser/list
  //提取信息
  Get: function (id) {
    const data = {
      id
    };
    return request({
      url: baseUrl + "/systemDictData/get",
      method: "post",
      data: qs.stringify(data)
    });
  },

  // 删除
  Del: function (id, userId, type) {
    const data = {
      id, userId, type
    }
    return request({
      url: baseUrl + "/approveUser/deleteApproveUser",
      method: "post",
      data: qs.stringify(data)
    });
  },
  save: function (data) {
    const config = {
      headers: {
        'Content-Type': 'application/json;charset=utf-8'
      },
    }
    return request.post(baseUrl + "/systemDictData/save", data, config)
  }
}